home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / os2 / 20arieel.zip / Bin / install.cmd < prev    next >
OS/2 REXX Batch file  |  1996-06-19  |  6KB  |  206 lines

  1. /******************************************************************************/
  2. /* Andreas Haack
  3. ** BD:290365
  4. **
  5. ** Copyright 1995 (C) by Andreas Haack
  6. **
  7. ** $Id: install.cmd,v 1.6 1996/06/19 22:27:32 hak Exp hak $
  8. ** $Revision: 1.6 $
  9. *******************************************************************************
  10. ** Installation of Arieel (C)
  11. **
  12. ** $Log: install.cmd,v $
  13. ** Revision 1.6  1996/06/19 22:27:32  hak
  14. ** dereg-> deinst
  15. **
  16. ** Revision 1.5  1996/03/03 21:12:01  hak
  17. ** Released Version
  18. **
  19. ** Revision 1.4  1996/02/29 09:08:34  hak
  20. ** removed brasil and japan
  21. **
  22. ** Revision 1.3  1996/02/22 22:20:26  hak
  23. ** Luxemburg correted
  24. **
  25. ** Revision 1.1  1996/02/20 22:49:36  hak
  26. ** Initial revision
  27. **
  28. *******************************************************************************/
  29.  
  30. trace('O');
  31.  
  32.  
  33. /************************************************************
  34. ** setup
  35. Brasil_Portuguese       PT_PT    PT
  36. Belgium_French          FR_FR    BE
  37. Belgium_Nederlands      NL_NL    BE
  38. Canada_French           FR_FR    CA
  39. Canada_English          EN_US    CA
  40. Denmark_Danish          DA_DK    DK
  41. Finland_Finnish         FI_FI    FI
  42. France_French           FR_FR    FR
  43. Germany_Deutsch         DE_DE    DE
  44. Iceland_╓slensk         IS_IS    IS
  45. Italy_Italian           IT_IT    IT
  46. Japan_English           EN_JP    JP
  47. Japan_Japanese          JA_JP    JP
  48. Netherlands_Nederlands  NL_NL    NL
  49. Norway_Norwegian        NO_NO    NO
  50. Portugal_Portuguese     PT_PT    PT
  51. Spain_Español           ES_ES    ES
  52. Sweden_Svensk           SV_SE    SE
  53. Switzerland_Deutsch     DE_DE    CH
  54. Switzerland_French      FR_FR    CH
  55. Turkey_Turkish          TR_TR    TR
  56. United Kingdom_English  EN_US    GB
  57. United States_English   EN_US    US -cwm-
  58. ************************************************************/
  59.  
  60. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  61. call 'SysLoadFuncs';
  62.  
  63.  
  64. call SysFileTree '.\Arieel.exe', 'matches';
  65.  
  66. if (matches.0 = 0) then
  67. do
  68.     say "Must be started in directory where Arieel.exe is located!";
  69.     signal ERROR;
  70. end
  71.  
  72.  
  73.  
  74.     call directory('..');
  75.  
  76.     Object = directory();
  77.     Params = 'OBJECTID=<WPH_ARIEEL>;';
  78.     Params = Params || 'ICONFILE=Icons\Ariell.ico;'
  79.     Params = Params || 'BACKGROUND=(none),,,C,0 206 0;'
  80.  
  81.  
  82.     call setupObject;
  83.  
  84.     Params = 'OPEN=DEFAULT;'
  85.  
  86.     call setupObject;
  87.  
  88.     TargetLocation='<WPH_ARIEEL>'
  89.     Class='WPProgram'
  90.  
  91.  
  92.     call createArieelObject "Belgium_French",       "FR_FR", "BE", "";
  93.     call createArieelObject "Belgium_Nederlands",   "NL_NL", "BE", "";
  94.     call createArieelObject "Canada_French",        "FR_FR", "CA", "";
  95.     call createArieelObject "Canada_English",       "EN_US", "CA", "";
  96.     call createArieelObject "Denmark",              "DA_DK", "DK", "";
  97.     call createArieelObject "Finland",              "FI_FI", "FI", "";
  98.     call createArieelObject "France",               "FR_FR", "FR", "";
  99.     call createArieelObject "Germany",              "DE_DE", "DE", "";
  100.     call createArieelObject "Iceland",              "IS_IS", "IS", "";
  101.     call createArieelObject "Italy",                "IT_IT", "IT", "-cwm-";
  102.     call createArieelObject "Luxemburg",            "FR_FR", "LX", "";
  103.     call createArieelObject "Netherlands",          "NL_NL", "NL", "";
  104.     call createArieelObject "Norway",               "NO_NO", "NO", "";
  105.     call createArieelObject "Portugal",             "PT_PT", "PT", "-cwm-";
  106.     call createArieelObject "Spain",                "ES_ES", "ES", "-cwm-";
  107.     call createArieelObject "Sweden",               "SV_SE", "SE", "";
  108.     call createArieelObject "Switzerland_Deutsch",  "DE_DE", "CH", "";
  109.     call createArieelObject "Switzerland_French",   "FR_FR", "CH", "";
  110.     call createArieelObject "Turkey",               "TR_TR", "TR", "";
  111.     call createArieelObject "United Kingdom",       "EN_US", "GB", "";
  112.     call createArieelObject "United States",        "EN_US", "US", "-cwm-";
  113.  
  114.  
  115.  
  116.     Title = 'Reset'
  117.     Params =  'ICONFILE=' || Object ||'\Icons\Ariell.ICO;'
  118.     Params =  Params || 'EXENAME=' || Object ||'\Bin\Arieel.exe;'
  119.     Params =  Params || 'PARAMETERS= -xr;'
  120.     call installObject;
  121.  
  122.     Title='Deinstall'
  123.     Params =  'EXENAME=' || Object ||'\Bin\Arieel.exe;'
  124.     Params =  Params 'ICONFILE=' || Object ||'\Icons\Ariell.ICO;'
  125.     Params =  Params || 'PARAMETERS= -xd;'
  126.  
  127.     call installObject;
  128.  
  129.  
  130.     Title='Arieel Your Gateway to the Time';
  131.     Params = 'EXENAME=view.exe;'
  132.     Params =  Params || 'PARAMETERS=' || Object ||'\Bin\Arieel.inf;'
  133.  
  134.     call installObject;
  135.  
  136. signal done;
  137.  
  138.  
  139. /************************************************************
  140. ** create Arieel Object
  141. ************************************************************/
  142.  
  143. createArieelObject:
  144. parse arg Title, Language, Territory, Extra .
  145.     Params = 'EXENAME='|| Object ||'\Bin\Arieel.exe;';
  146.     Params = Params || 'ICONFILE='|| Object ||'\Icons\'||Territory||'.ICO;';
  147.     Params = Params || 'PARAMETERS= -glng ' || Language || ' -gter ' || Territory || ' ' || Extra || ';';
  148.     Params = Params || 'SET LOCPATH='|| Object ||'\locale;';
  149.     call installObject;
  150. return;
  151.  
  152. hallo:
  153. say "T: " Title " C:" Class " T:" TargetLocation " P:" Params;
  154. return;
  155.  
  156. /************************************************************
  157. ** install object
  158. ***********************************************************/
  159.  
  160.  
  161.  
  162. installObject:
  163.     rc = SysCreateObject( Class, Title, TargetLocation, Params, 'UpdateIfExists' );
  164.     if rc = 0 Then
  165.        do
  166.         say 'ERROR -     Object' Title 'not created.'
  167.         say '            Params:['Params']'
  168.         end;
  169.     else
  170.        do
  171.         say 'success -   Object' Title' created. - done';
  172.         end;
  173. return;
  174.  
  175. setupObject:
  176.     rc = SysSetObjectData(Object, Params);
  177.     if rc = 0 then
  178.         do
  179.         say 'ERROR -     Object' Object 'not updated.'
  180.         say '            Params:['Params']'
  181.         end;
  182.     else
  183.         do
  184.         say 'success -   Object' Object ' updated. - done';
  185.         end;
  186. return;
  187.  
  188.  
  189. FAILURE:
  190. Say 'REXX failure.'
  191. Signal DONE
  192.  
  193. HALT:
  194. Say 'REXX halt.'
  195. Signal DONE
  196.  
  197. SYNTAX:
  198. Say 'REXX syntax error.'
  199. Signal DONE
  200.  
  201. ERROR:
  202. say "Error"
  203.  
  204. DONE:
  205. Exit
  206.